<%@ page import="ionio.cscw.game.Database" %>
<% Database db=new Database(); %>
<!DOCTYPE HTML>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Right On The Reel</title>
    <link rel="stylesheet" type="text/css" href="style.css"/>
    <script type="text/javascript">var userId=<%=db.getNewId()%>;</script>
    <script type="text/javascript" src="lib/swfobject.js"></script>    
    <script type="text/javascript" src="lib/game.js"></script>    
    <script type="text/javascript" src="lib/animation.js"></script>
  </head>
  <body>
	<h1 id="game_status">Loading...</h1>
	<div id="video_container" style="visibility:hidden;">
    <div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div>
    <script type="text/javascript">
      var params = { allowScriptAccess: "always" };
      var atts = { id: "myytplayer" };
      swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&version=3",
                        "ytapiplayer", "800", "456", "8", null, null, params, atts);
    </script>
	</div>
	<input id="textbox" type="text" style="visibility:hidden"/>
	<div id="score_container">
		<div id="score_label">SCORE</div>
		<div id="score">0</div>
		<div id="wordscore"></div>
	</div>
	<div id="namePopup" style="visibility:hidden;">	
		TYPE YOUR NAME
		<input id="nickname" type="text" value="GUEST"/>
		<button onclick="sendResults()">DONE</button>
	</div>
	<div id="debug"></div>
  </body>
</html>
